<template>
  <ifButton type="primary" size="small" style="margin-bottom: 10px" @click="changePage"> 切换页面 </ifButton>
  {{ page }}
  <window v-if="page === 'window'"></window>
  <mobile v-else></mobile>
</template>

<script>
import { ref } from 'vue'
import window from '../components/window'
import mobile from '../components/mobile'
export default {
  components: { window, mobile },
  props: {
  },

  setup (props, $) {
    const page = ref('window')
    const changePage = () => {
      page.value = page.value === 'window' ? 'mobile' : 'window'
    }
    return { page, changePage }
  }
}
</script>
